#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
#include <stdio.h>
#include "soft_timer.h"
pthread_t id1;
soft_timer_t timer1;
soft_timer_t timer2;
void* fun(void *arg)
{
    while(1)
    {
        usleep(10000);
        soft_timer_inc_ticks();
    }

}
void fun1(void* parm)
{
    printf("%s\n",(char*)parm);
}
int main(int argc, char** argv)
{
    pthread_create(&id1,NULL,fun,NULL);
    soft_timer_add(&timer1, -1, 25, fun1, "25");
    soft_timer_add(&timer2, -1, 50, fun1, "50");
    while(1)
    {
        /* 定时器轮询 */
        soft_timer_loop();
        soft_timer_delay_ticks(10);
    }
    
}
